package com.ssh.controller;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ssh.service.CategoryService;

@Controller
@RequestMapping("/category")
public class CategoryController {

	@Autowired
	private CategoryService cs;

	@RequestMapping(value = "/find.do")
	public String findAll(HttpServletRequest req, HttpServletResponse rsp) {
		try {
			rsp.setContentType("text/html;charset=utf-8");
			String value = cs.findAll();
//			System.out.println(value);
			rsp.getWriter().println(value);
		} catch (IOException e) {
		}

		return null;
	}
}
